# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=randrctl
pkgver=1.8.2
pkgrel=0
pkgdesc="Profile based screen manager for X"
url="https://github.com/edio/randrctl"
arch="noarch"
license="GPL-3.0-or-later"
depends="python3 py3-argcomplete py3-yaml xrandr"
checkdepends="py3-pytest"
makedepends="python3-dev py3-pbr py3-setuptools"
source="https://github.com/edio/randrctl/archive/$pkgver/randrctl-$pkgver.tar.gz"

export PBR_VERSION="$pkgver"

build() {
	python3 setup.py build
}

check() {
	pytest-3 .
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"

	install -m 644 -D randrctl/setup/99-randrctl.rules \
		"$pkgdir"/lib/udev/rules.d/99-$pkgname.rules
}

sha512sums="81b9ff948e7510208776d8a91e98fea6ddf4a7fd3470560186aaafdc0f260a39ea733d8638ff6c7e86ac33a7f6eb90c387c4009a2d6e2afad36d4e2400efe0b1  randrctl-1.8.2.tar.gz"
